package genstream

import util.generic.GenericSignature
/**
 * Created by IntelliJ IDEA.
 * User: zslajchrt
 * Date: 12.4.11
 * Time: 15:01
 * To change this template use File | Settings | File Templates.
 */

@serializable
@SerialVersionUID(1L)
@GenericSignature(Array(1 /*CO-VARIANT*/))
trait ServiceFactory[+X] {
  def newInstance(): X
}

@SerialVersionUID(1L)
class FunctionalServiceFactory[+X](creator: => X) extends ServiceFactory[X] {
  def newInstance() = creator
}
